Pod::Spec.new do |s|
  s.name             = 'TestWork'
  s.version          = '0.1.2'
  s.summary          = 'A short description of TestWork.'

  s.description      = <<-DESC
TODO: Add long description of the pod here.
                       DESC

  s.homepage         = 'https://gitee.com/Holink521/TestWork'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'Hoolink' => 'hulinhu2010@163.com' }
  s.swift_versions   = '5.5'
  s.ios.deployment_target = '16.0'

  # 本地文件路径
  iOS_lib_ZipURL = "http://localhost:8080/SDK_Downloads/BlocksKit.zip"
  puts "--------- #{iOS_lib_ZipURL} is in source code state now. -------"

  # 执行下载并解压的命令
  s.prepare_command = <<-CMD
    echo "Downloading and extracting..."
    test -f download_zip.sh && sh download_zip.sh BlocksKit #{iOS_lib_ZipURL}
    echo "Download and extraction completed"
  CMD

  # 设置依赖的框架
  s.source = { :http => iOS_lib_ZipURL }
  
  # 引入解压后的 framework
  s.vendored_frameworks = "BlocksKit.framework"
  s.preserve_paths = "BlocksKit.framework", "download_zip.sh"
end
